﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Data.SqlClient;
using Entity;
using Business; 


namespace WebApp
{
    public partial class ProvinceforUser : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bindnews();
        }
        private void Bindnews()
        {

            GridView1.DataSource = GridDataSource();
            GridView1.DataBind();
        }
        private DataTable GridDataSource()
        {
            Province_Bussiness pb = new Province_Bussiness();
            DataTable dt = new DataTable();
            try
            {
                dt = pb.LoadP();
            }
            catch (Exception ee)
            {
                throw new Exception(ee.Message);
            }
            finally
            {
                pb = null;
            }

            return dt;
        }
    }
}